<template>
  <div class="follows">
    <div class="ww">
        <HpHeader />
        <div class="content">
            <div class="title">
                <p>关注({{ userInfo.follows }})</p>
            </div>
            <UserCard :dataList="dataList" />
        </div>
    </div>
  </div>
</template>

<script>
import HpHeader from '@/components/HomepageHeader'
import UserCard from '@/components/UserCard'
export default {
  components:{ HpHeader, UserCard },
  computed: {
    userInfo() {
      return this.$store.state.user.userInfo
    }
  },
  data() {
    return {
        dataList: [],
        dataItem: {
            vartar: 'http://p1.music.126.net/fL9ORyu0e777lppGU3D89A==/109951167206009876.jpg?param=60y60',
            name: '网易云音乐',
            events: 19488,
            follows: 487,
            fans: 99999,
            desc: '网易云音乐是8亿人都在使用的音乐平台网易云音乐是8亿人都在使用的音乐平台',
            isFollow: true
        }
    }
  },
  created() {
    for(let i=1; i<=this.userInfo.follows; i++) {
        this.dataList.push({ id: i, ...this.dataItem})
    }
  }
}
</script>

<style lang="less" scoped>
    .follows {
        .ww {
            background-color: #fff;
            .content {
                margin: 40px;
                padding-bottom: 40px;
                .title {
                    height: 33px;
                    padding-bottom: 5px;
                    border-bottom: 2px solid #C10D0C;
                    p {
                        font-size: 20px;
                        font-weight: normal;
                        min-width: 60px;
                        line-height: 28px;
                        color: #333;
                    }
                }
            }
        }
    }
</style>